import { FC } from "react"
import { useSelector } from "react-redux/es/hooks/useSelector"

import { SFormItem } from "@/components/common"
import StyleSelect from "@/components/common/styleSelect"
import { useLocale } from "@/locales"
import { AppState } from "@/stores"
// import { TableColumnType } from "antd"
// import dynamicComponent from "./dynamicImport"

const EntryAuthType: FC = () => {
	const { newFormat } = useLocale()
	const { allDictLists } = useSelector((state: AppState) => state.config)
	const options = allDictLists["entrAuthorityType"].map((item: { label: string; value: any }) => {
		return {
			label: newFormat(item.label),
			value: item.value
		}
	})
	return (
		<SFormItem name="entryAuthority" label={newFormat("label.entryAuthority")}>
			<StyleSelect options={options} placeholder={newFormat({ id: "label.select_all" })} allowClear />
		</SFormItem>
	)
}

export default EntryAuthType
